import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
    name: 'sexReform',
    pure: false
})
// 性别转换通道
export class SexReformPipe implements PipeTransform {
    transform(value: any, args?: any): any {
        let chineseSex;
        switch (value) {
            case '1':
                chineseSex = '男';
                break;
            case '0':
                chineseSex = '女';
                break;
            default:
                chineseSex = '未知';
                break;
        }
        return chineseSex;
    }
}
